import java.util.Random;

public class UIProcess extends AbstractProcess
{
	private String[] POSSIBLE_INSTRUCTIONS = {"ADD", "SUB", "MUL", "DIV", "IO"};
	private Random my_random_generator;
	private String[] my_instructions;

	public UIProcess(final int the_id, final String the_name, final int the_priority) 
	{
		super(the_id, the_name, the_priority);
		my_random_generator = new Random();
		my_random_generator.setSeed(System.currentTimeMillis());
	}
	
	public void generateInstructions()
	{
		my_instructions = new String[super.getNumInstructions()];
		int random_number;
		
		for (int i = 0; i < super.getNumInstructions(); i++)
		{
			random_number = Math.abs(my_random_generator.nextInt() % POSSIBLE_INSTRUCTIONS.length);
			my_instructions[i] = POSSIBLE_INSTRUCTIONS[random_number];
		}
	}
	
	public String[] getInstructions()
	{
		return my_instructions;
	}
}
